package demo.generic;

import java.util.LinkedList;
import java.util.List;

/**
 * @author zhanghaixuan
 * @date 2020-03-03 10:36
 */
public class GenericDemo {

    public static void main(String[] args) {
        List<String> linkedList = new LinkedList();
        linkedList.add("words");
//        linkedList.add(1);

        for (Object o : linkedList) {
            String str = (String) o;
        }
    }
}
